<template>
	<nav-header>
		<template #name>专题精选</template>
		<template #custom class="custom">
			<navigator url="/pages/classify/classify" open-type="reLaunch" class="item">More+</navigator>
		</template>
	</nav-header>
	<div class="theme">
		<theme-item v-for="(item, index) in topicList" :key="item._id" :item="item"></theme-item>
		<theme-item :isMore="true"></theme-item>
	</div>
</template>

<script setup>
import { apiGetClassify } from '@/service/apis';

	const topicList = ref([]);	// 专题列表
	const getTopic = async()=>{
		const res = await apiGetClassify({select:true})
		topicList.value = res
	}
	onMounted(() => {
		getTopic()
	})

</script>

<style lang="scss" scoped>
.theme {
	padding: 0 30rpx;
	display: grid;
	gap: 15rpx;
	grid-template-columns: repeat(3, 1fr);
}
</style>